package com.trust.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.trust.entity.FarmPlantLand;
import com.trust.mapper.FarmPlantLandMapper;
import com.trust.service.FarmPlantLandService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class FarmPlantLandServiceImpl extends ServiceImpl<FarmPlantLandMapper, FarmPlantLand> implements FarmPlantLandService {

    @Resource
    private FarmPlantLandMapper mapper;

    @Override
    public void removeByPlantId(Integer plantId) {
        LambdaQueryWrapper<FarmPlantLand> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(FarmPlantLand::getFarmPlantId, plantId);
        this.remove(wrapper);
    }
}
